package com.dayaokeji.rhythmschoolstudent.client.home.course.task;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dayaokeji.rhythmschoolstudent.R;
import com.dayaokeji.rhythmschoolstudent.client.common.base.common.ApiConstantKt;
import com.dayaokeji.rhythmschoolstudent.glide.GlideUrlModel;
import com.dayaokeji.rhythmschoolstudent.glide.GlideUtils;

/**
 * Created by Gorden on 2018/3/23.
 */

public class RemoteFilesAdapter extends BaseQuickAdapter<Integer,BaseViewHolder> {

    public RemoteFilesAdapter() {
        super(R.layout.item_img_not_close, null);
    }

    @Override
    protected void convert(BaseViewHolder helper, Integer item) {
        ImageView imageView = helper.getView(R.id.iv_add_file_img);
        if (item != null) {
            GlideUtils.with(mContext).load(new GlideUrlModel(ApiConstantKt.getRemoteImageUrl()+item)).apply(GlideUtils.configDefaultRequestOptions()).into(imageView);
        }
    }

}
